'use strict';

const BaseController = require('../base');

class RechargeController extends BaseController {
  static get serviceName() {
    return 'common.recharge';
  }

  /**
   * 申请退款
   */
  async refund() {
    const result = await this.service.refund(this.ctx.request.body);
    this.ctx.success(result);
  }

  /**
   * 确认退款
   */
  async refundConfirm() {
    const result = await this.service.refundConfirm(this.ctx.request.body);
    this.ctx.success(result);
  }
}

module.exports = RechargeController;
